package com.bw.wxy.mvp.view.video.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bw.wxy.R;
import com.bw.wxy.common.GlideUtils;
import com.bw.wxy.mvp.model.entity.VideoNewsEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class SmallVideoAdapter extends BaseQuickAdapter<VideoNewsEntity.Values, BaseViewHolder> {
    public SmallVideoAdapter( @Nullable List<VideoNewsEntity.Values> data) {
        super(R.layout.item_small_video, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, VideoNewsEntity.Values item) {
        helper.setText(R.id.small_item_title_tv,item.news_title);
        ImageView img = helper.getView(R.id.small_item_cover_img);
        GlideUtils.getInstance().loadMatchImg(item.medias.get(0).media_url,img);
    }
}

